package com.ningxia.water.entity;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ningxia.water.enums.WarnCodeEnum;
import com.ningxia.water.enums.WellStatusEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author hz
 * @since 2021-03-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties(value = {"handler"})
@Accessors(chain = true)
public class TsWellWarn implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 1:水量超额报警 2：机井故障报警 3:流量异常报警 4：设备电池电量不足报警
     */
    private Integer warnCode;

    /**
     * 机井id
     */
    private Integer wellId;

    /**
     * 0:未处理 1：已处理
     */
    private Integer status;

    /**
     * 报警时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime warnTime;

    /**
     * 用水户id
     */
    private Integer applicantId;

    public TsWellWarn(Integer warnCode, Integer wellId, Integer status, LocalDateTime warnTime) {
        this.warnCode = warnCode;
        this.wellId = wellId;
        this.status = status;
        this.warnTime = warnTime;
    }

    public TsWellWarn(Integer warnCode, Integer status, LocalDateTime warnTime, Integer applicantId) {
        this.warnCode = warnCode;
        this.status = status;
        this.warnTime = warnTime;
        this.applicantId = applicantId;
    }

    public TsWellWarn(Integer warnCode, Integer wellId, Integer status, LocalDateTime warnTime, Integer applicantId) {
        this.warnCode = warnCode;
        this.wellId = wellId;
        this.status = status;
        this.warnTime = warnTime;
        this.applicantId = applicantId;
    }

}
